<template>
  <el-carousel class="carousel" :interval="5000">
    <el-carousel-item v-for="item in arrImg" :key="item">
      <img class="lbt" :src="item" alt="">
    </el-carousel-item>
    <div class="sousuo">
      <div class="ttt"><p>搜索</p></div>
      <el-input placeholder="请输入想搜索的地区" v-model="iptVal" class="input-with-select">

    <el-button @click="sousuoBtn" slot="append" icon="el-icon-search"></el-button>
  </el-input>
    </div>
  </el-carousel>
</template>
<script>
export default {
  data() {
    return {
      iptVal:'',
      arrImg: [
        "https://hr70-1309020117.cos.ap-guangzhou.myqcloud.com/5.png",
        "https://hr70-1309020117.cos.ap-guangzhou.myqcloud.com/7.png",
        "https://hr70-1309020117.cos.ap-guangzhou.myqcloud.com/8.png",
        "https://hr70-1309020117.cos.ap-guangzhou.myqcloud.com/9.png",
        // "https://hr70-1309020117.cos.ap-guangzhou.myqcloud.com/4.jpeg",
      ],
    };
  },
  methods: {
    sousuoBtn(){
      this.$router.push({
        path: "/property",
        query:{
          val:this.iptVal
        }
      });
    }
  }
};
</script>
<style lang="less">
.lbt{
  object-fit: cover;
}
.carousel{
  position: absolute;
  /* width: 99vw; */
  /* top: 60px; */
  /* left: -351px; */
  width: 100%;
  // height: 700px;
  height: calc(100vh - 62px);
}
.el-carousel__item h3 {
  color: #475669;
  font-size: 18px;
  opacity: 0.75;
  line-height: 300px;
  margin: 0;
}

.el-carousel__item img {
  width: 100%;
  height: 100%;
}

.el-carousel__item:nth-child(2n + 1) {
  background-color: #d3dce6;
}

.el-carousel__container{
  height: 100%;
}

.el-carousel{
  position: relative;
}
.sousuo{
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 6;
  width: 30%;
  transform: translateX(-50%);
  .ttt{
    position: absolute;
    left: 0;
    top: -33px;
    width: 50px;
    height: 35px;
    border-bottom: 43px solid #eeeeec;
    border-left: 60px solid #eeeeec;
    border-right: 10px solid transparent;
    p{
      position: absolute;
      width: 60px;
      height: 40px;
      left: -60px;
      text-align: center;
      line-height: 30px;
      top: 0;
    }
  }
}
  .el-select .el-input {
    width: 130px;
  }
</style>